<!--
/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright 2014 The moOde audio player project / Tim Curtis
 *
 * 汉化：Androidnews
 *
*/
-->
<div id="container">
<div class="container">
	<h1 class="ren-config">蓝牙控制</h1>

    <form class="form-horizontal" action="" method="post">
    	<legend>设备</legend>
		<div class="control-group">
			<select id="btcmd" class="config-select-large" name="btcmd" onchange="autoClick('#btn-set-cmd');" $_ctl_disabled>
				$_cmd[btcmd]
			</select>
			<button id="btn-set-cmd" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="run_btcmd" value="1" $_ctl_disabled>提交</button>
			<a aria-label="Help" class="config-info-toggle" data-cmd="info-btcmd" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
			<span id="info-btcmd" class="config-help-info">
				Select a command to submit to the Bluetooth controller.
	        </span>
			<div id="blu-control-cmd-output">
				$_cmd_output
			</div>

			<div class="$_hide_ctl[paired_device]">
				<select id="paired-device" class="config-select-large" name="paired_device">
					$_device[paired_device]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="connectto_device" value="1">连接</button>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="rm_paired_device" value="1"><i class="fa fa-sharp fa-trash"></i></button>
				<span class="config-msg-static">
					Connect or remove a paired device. This also changes to the selected audio output.
	            </span>
			</div>

			<div class="$_hide_ctl[connected_device]">
				<select id="connected-device" class="config-select-large" name="connected_device">
					$_device[connected_device]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="disconnect_device" value="1">断开</button>
				<span class="config-msg-static">
					Disconnect the currently connected device. This also changes to the selected audio output.
	            </span>
			</div>

			<div class="$_hide_ctl[scanned_device]">
				<select id="scanned-device" class="config-select-large" name="scanned_device">
					$_device[scanned_device]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="pairwith_device" value="1">配对</button>
				<span class="config-msg-static">
					Select a device to pair with.
	            </span>
			</div>
		</div>

		<div class="control-group">
			<legend>设置</legend>
			<select id="audioout" class="config-select-large" name="audioout" onchange="autoClick('#btn-set-audioout');">
				$_select[audioout]
			</select>
			<button id="btn-set-audioout" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="change_audioout_bt" value="1"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
			<span class="config-msg-static">
				输出到本地音频设备或蓝牙扬声器.
            </span>

			<select id="pcm-buffer" class="config-select-large" name="pcm_buffer" onchange="autoClick('#btn-set-pcm-buffer');">
				$_select[pcm_buffer]
			</select>
			<button id="btn-set-pcm-buffer" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_pcm_buffer" value="1"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
			<span class="config-msg-static">
				以毫秒为单位的输入输出缓冲区长度.较低的值会减少延迟,但可能会导致数据丢失.
	        </span>

			<select id="sbc-quality" class="config-select-large" name="sbc_quality" onchange="autoClick('#btn-set-sbc-quality');">
				$_select[sbc_quality]
			</select>
			<button id="btn-set-sbc-quality" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_sbc_quality" value="1"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
			<span class="config-msg-static">
				使用SBC编码器时,指定质量模式.
				<!--b>Low:</b> Mono 114 kbps, Stereo 213 kbps<br>
				<b>Medium:</b> Mono 132 kbps, Stereo 237 kbps<br>
				<b>High:</b> Mono 198 kbps, Stereo 345 kbps<br>
				<b>XQ:</b> SBC Dual Channel HD 452 kbps<br>
				<b>XQ+:</b> SBC Dual Channel HD 551 kbps-->
	        </span>
		</div>

		<div class="control-group">
			<legend>ALSA输出模式</legend>
			<select id="alsa-output-mode-bt" class="config-select-large" name="alsa_output_mode_bt" onchange="autoClick('#btn-set-alsa-output-mode-bt');">
				$_select[alsa_output_mode_bt]
			</select>
			<button id="btn-set-alsa-output-mode-bt" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_alsa_output_mode_bt" value="1"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
			<span class="config-msg-static">
				<b>Standard:</b> 使用音频配置中的“输出模式”设置.这使得DSP能够被使用.<br>
				<b>Compatibility:</b> 这种模式提高了设备兼容性,但不支持DSP.
            </span>
		</div>
	</form>
</div>
</div>
